home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
726-750
/
740
/
hdmem
/
hdmem.doc
< prev
next >
Wrap
Text File
|
1995-03-18
|
10KB
|
221 lines
[0m[0 p [32;40m------------------------------------[0m
[33;40m [32;40mHDMem - virtual memory for the AMIGA[0m
[33;40m [32;40m------------------------------------[0m
[33;40mcopyright 1992 by Stefan Rompf[0m
Nobody has enough RAM, whatever he does on his Amiga - if you want
to run several applications using the multitasking capability - or if
you simply have one program which requires a lot more memory than you
have. So you extend your Amiga's RAM as much as possible till a the
day you take a look at your bank account.....
The problem is that one meg still costs about DM 70 and you don't
need a calculator to know what you must pay ten or even twenty megaby
tes. Even worse is that these lots of memory are only used for some
special cases and will stay empty most of the time (I know this well
one my seven MB 68030-Amiga). That's when virtual memory becoms use
ful.
But - what the hell IS virtual memory? Well, it means that you can
use more ram than your computer actually has. To make things more sim
ple: A part of your harddisk will be used as random access memory,
applications can store their data there without allocating real me
mory.
Technically virtual memory is always handled the following way,
even by my HDMem software: A block of your real RAM will be reserved.
Then, when somebody tries to access the virtual memory, the MMU of yo
ur 68030 will cause an exception. My HDMem server intercepts this ex
ception and loads a block which contains the needed byte, word or
longword to the reserved RAM. The MMU tree will be changed so that
the access now maps to there.
HDMem uses a hard disk file for its data. It works with 32K blocks.
When you start HDMem, you can select the size of the file in 32K-steps
and with that, the size of your virtual memory. The registered version
allows you one Giga(!)byte, while the demo-version has a limitation of
one Megabyte. Refer to register.doc about copyright questions and
getting a registered user. You can also select number of 32K-buffers
in your real RAM, where more means higher speed.
To run HDMem, you need the following configuration: Amiga 3000 or
Amiga 2000 with 68030 or 68020+68851. 68040-users have PP (persönli
ches Pech, ask a german what this means). HDMem adds its ram above
$80000000, so there must not be a ram card at this location. Another
thing you need is Kickstart 2.0, exec version V37 or higher. A hard-
disk drive is useful, but if you really want to, you can locate the
file on a normal disk-drive. As HDMem uses the MMU, you cannot run it
simultaneously with programs like the Enforcer. But I have added com
patibility for the CPU FASTROM command because this one really increa
ses the speed of your Amiga.
The unregistered version comes with the following files:
hdmem.library - copy this to the LIBS:-directory of your Harddisk. The
library contains the complete virtual memory handler.
HDMem - this is the command to start the virtual memory. It allows you
to select the size, the file and the priority the memory is added to
the system. C: might be a good destination.
hdmem.doc - you read this one right now!
register.doc - A text file which contains information about how get
ting a registered user.
gurus.doc - A list of the alerts created
[32;40mFeatures of the HDMem package:[0m
[32;40m-up to 1 Gigabyte of virtual memory (registered version)[0m
[32;40m-choosable number of buffers[0m
[32;40m-special algorithm which detects the less used buffer when a change is[0m
[32;40m required[0m
[32;40m-only buffers that have got modified will be written to the file[0m
[32;40m-you can select which tasks get virtual memory and which ones not[0m
HDMem is designed to supply memory for data - not for instructions.
Therefore, the memory is not added as public memory, but with the
attributes MEMF_FAST (4) and MEMF_VIRTUAL (8). So, every program which
requests MEMF_ FAST or MEMF_ANY will get the virtual memory. Message
ports, task structures or program code itself will not be allocated
there as the operating system requests MEMF_PUBLIC for this. The rea
son to do this is the following: When the task which causes a side
change is currently running in supervisor mode, the system will
hang. This can happen if f.e. a sound sampling program is in super
visor mode for speed reasons and writes to virtual memory. The opera
ting system will be patched that no tasks or interrupts with headers
located in virtual memory become active. If a program always fails,
you can remove it from the compatibility list. MEMF_VIRTUAL is not
registered at CATS till now - but I hope it will become.
When starting HDMem the operating system is patched that task or
interrupt structures located in virtual memory will not be added. The
re exist special recoverable alerts to report when this happens.
About the side changing problem in supervisor mode: In the excep
tion routine, HDMem normally returns to user mode and takes control
over the task that caused the exception. It creates a message and
sends it to the HDMem server task. That task will change the sides and
reply the message. After this, the command which caused the excep
tion will be re-executed. When your Amiga was in supervisor mode, it
is not known if the exception is caused from a task or an interrupt
that cannot be stopped. Therefore, I have added an (deadend) alert
which will let you know when this happens. This task MUST be added to
the incompatibility list.
How to start HDMem
The command to activate virtual memory is the HDMem command. It has
the following syntax:
HDMem FILE/A,BLOCKS/N/A,BUFS/N/A,PRI/N,FILELIST/K,DEBUG/S
The first four parameters must be given. FILE is a string which
contains the name of the file used to store the sides, f.e. dh2:da
tei. BLOCKS is the number of 32K-blocks your virtual memory should
contain, 32 Blocks are 32*32K=1024 KBytes. Remember that the unregis
tered version is limited to 63 blocks. BUFS is a numerical argument,
too. It sets the number of 32K-buffers in YOUR memory to store the
virtual blocks. The more you use, the better. When using a large
amount of virtual memory, at leat 32 buffers are recommended. In the
unregistered version, 8 should be enough. If you specify less than
four buffers, HDMem increases this to 4. The PRI argument allow you
to set the priority with which to memory is added to the system. -5 is
best, you should not set HDMem to highest priority due to a bug in DOS
that I did not patch till now.
Example: HDMem dh2:datei 63 8 -5
(adds 2016 KB memory, 256 KB buffer with priority of -5 to system)
The FILELIST parameter is optional. It allows you to use your spe
cial file of incompatible tasks instead of the default, ErrTaskList or
S:ErrTaskList. The syntax is: FILELIST=datei. You must specify the
FILELIST key here.
The last parameter, DEBUG, is just a switch. When specified, HDMem
does not add the memory to system. This is mainly for MY debugging
purposes, but I did not remove the argument as you might need it.
Example: HDMem dh2:datei 63 8 -5 FILELIST=S:Tasks DEBUG
(not really useful because FILELIST is not needed when DEBUG active)
The following errors can be reported from HDMem:
Cannot open hdmem.library V2.0: The hdmem.library is not in your actu
al directory or in the LIBS:-drawer.
MMU-initialisation failed: Your MMU is in use. This happens when HDMem
has been installed before or some MMU tools like the Enforcer are ac-
tive. Remember that the CPU FastROM command is supported.
hdmem.library reported error: Happens normally only when the file can
not be created.
Argument parsing error: You have entered something wrong.
Incompatible task file not found: This is shown when you specify a in-
compatible task file of your own which cannot be found.
Once started, HDMem cannot be removed from the system. You have to
reset to do this.
The incompatible task list:
This is an ascii list in which you can specify the programs that
won't get any virtual memory. It might be useful if you have some
software that causes gurus which are specified in gurus.doc. It is a
simple ascii file which has a task name in every single line. The na
mes are not case significant. All tasks listed there will allocate pu
blic memory only. If you don't specify your own list in the HDMem
command, there are two default lists: ErrTaskList in the actual direc
tory and S:ErrTaskList. Only one of them will be opened, the file in
your current directory has higher priority than the one in S:. If
you specify a file, it will always be used.
Remember that neither CLI processes nor tasks with a priority >= 5
will get virtual memory. This is done for a OS incompatibility and for
problems that might arise if the filesystem you are running HDMem on
tries to allocate virtual memory (=deadlock).
Bug reports:
HDMem has been tested thoroughly, but there might still be some
bugs. To report them, send the following informations to me: Version
of HDMem command, version of hdmem.library. These can be extracted
with the OS2.0 version command. Also, I need to know something about
your configuration ect. You can find my address in the register.doc
file.
Things I want to improve soon:
-start from workbench
-patching & fixing the DOS bug
-using a complete partition for HDMem
-things you suggest to me
----------------------------------------------------------------------
Stefan Rompf
[0m[1 p